<%@page import="hmg.vo.BoardVO"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
    List<BoardVO> newsList = (List<BoardVO>) request.getAttribute("NewsList");
    String listType = (String) request.getAttribute("listType");
    String compType = (String) request.getAttribute("compType");
    String strListID = request.getParameter("listID");
    
    Integer intListID = new Integer(strListID);
    
    if (newsList != null && newsList.size() > 0) {
        for (int idx = 0; idx < newsList.size(); idx++) {
            BoardVO news = newsList.get(idx);

            if (idx + 1 == newsList.size()) {
                if (news.getListID() == intListID)
                    out.println("                            <li id=\"newsList_li_" + idx + "\" class=\"on last\"><a href=\"javascript:fn_main_article(" + news.getListID() + ");\"><img src=\"" + news.getThumbnailImage() + "\" /></a></li>");
                else
                    out.println("                            <li id=\"newsList_li_" + idx + "\" class=\"last\"><a href=\"javascript:fn_main_article(" + news.getListID() + ");\"><img src=\"" + news.getThumbnailImage() + "\" /></a></li>");

            }
            else {
                if (news.getListID() == intListID)
                    out.println("                            <li id=\"newsList_li_" + idx + "\" class=\"on\"><a href=\"javascript:fn_main_article(" + news.getListID() + ");\"><img src=\"" + news.getThumbnailImage() + "\" /></a></li>");
                else
                    out.println("                            <li id=\"newsList_li_" + idx + "\"><a href=\"javascript:fn_main_article(" + news.getListID() + ");\"><img src=\"" + news.getThumbnailImage() + "\" /></a></li>");
            }
        }
    }
%>
